#include "Player.h"

Player::Player(std::string fileName, Vector3f &pos, float _scale)
	:Objects(fileName, pos, _scale)
{
	experience = 0;
	money = 10000;
	ammo = 70;
	ammoInClip = 5;

    FlwCam = new Camera();
    FlwCam->SetMode(CAM_FLW);
    FlwCam->zoom = 3;
    FlwCam->SetPosition(center - Vector3f(0,0,FlwCam->zoom));
    FlwCam->SetFocus(center);
}
Player::Player(std::string fileName, Vector3f &pos)
	:Objects(fileName, pos)
{
	experience = 0;
	money = 10000;
	ammo = 70;
	ammoInClip = 5;
}
Player::Player(std::string fileName)
	:Objects(fileName)
{
	experience = 0;
	money = 10000;
	ammo = 70;
	ammoInClip = 5;
}

void Player::update(float deltaT)
{
	position.x = velocity.x * deltaT + 0.5 * accel.x * deltaT * deltaT;
	position.y = velocity.y * deltaT + 0.5 * accel.y * deltaT * deltaT;
	position.z = velocity.z * deltaT + 0.5 * accel.z * deltaT * deltaT;
	
	velocity = velocity + accel * deltaT; //This might blow up in your face if you don't have vectors overloaded for a scalar.
}